<#import "include/main.ftl" as m />

<@m.main>
	<ul>
		<li><a href="#market">Mantenimiento email</a></li>
	</ul>
	
	<div id="market">
	
		<h2>JNDI mail session test</h2>
		
		<form method="post" action="/${base_path}/mantenimiento/test_jndi_email.html">
			<label for="jndi">JNDI:</label>
			<input type="text" id="jndi" name="jndi" />
			
			<label for="email">Email:</label>
			<input type="text" id="email" name="email" />
			
			<button>Enviar</button>
		</form>
		
		<#if mailStatus?size != 0>
			<h2>Worker</h2>
			
			<table class="list">
				<tr>
					<th>Last run</th>
					<th>Next run</th>
					<th>Error</th>
					<th>Count</th>
				</tr>
					
				<#list mailStatus as m>
					<tr>
						<td>${m.runDate?datetime}</td>
						<td>${m.nextRun?datetime}</td>
						<td><#if m.error>Y<#else>N</#if></td>
						<td>${m.emailsSent}</td>
					</tr>
				</#list>
			</table>
			
		</#if>
		
	</div>
</@m.main> 
